<?php
/**
 * 国内出库库存（国内库存出库记录）
 * (model)
 */

namespace App\Models\Inventory;

use App\Models\Basics\Supplier;
use Illuminate\Database\Eloquent\Model;
class Placing extends Model
{
    protected $table = 'in_placing';

    protected $guarded = [];

    public static $_type = [
        1 => '发货出库',
        2 => '组合出库',
        3 => '拆分出库',
        4 => '其它出库',
    ];

    public function detail(){
        return $this->hasMany(PlacingDetail::class,'placing_no','placing_no');
    }

    public function supplier(){
        return $this->belongsTo(Supplier::class,'supplier_id');
    }
}
